#include <iostream>
#include<string>
using namespace std;

int main() {
    int num;
    cin >> num;
    string ans = "";
    while (num > 0) {
        ans = ans + to_string(num % 2);
        num /= 2;
    }
    int sum = 0;
    for (auto& item : ans) {
        if (item == '1')
            sum++;
    }
    cout << sum;
}
